Skip to content

fix: Increase remote survey load timeout from 30s to 60s - #4011

Open
joshuaallgaier2-cmd wants to merge 1 commit into
google:masterfrom
joshuaallgaier2-cmd:fix/2901-survey-list-timeout
Open

joshuaallgaier2-cmd wants to merge 1 commit into
google:masterfrom
joshuaallgaier2-cmd:fix/2901-survey-list-timeout

Conversation

@joshuaallgaier2-cmd

Copy link
Copy Markdown

Fixes #2901

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request increases the remote survey load timeout from 30 seconds to 60 seconds in SurveyRepository.kt. The reviewer pointed out that this change will cause an existing unit test (getRemoteSurvey throws error when loading remote survey times out) in SurveyRepositoryTest.kt to fail because its simulated delay of 35 seconds is now shorter than the new timeout. It is recommended to update the test's delay to at least 65 seconds to ensure the timeout behavior is still correctly verified.


private const val ACTIVATE_SURVEY_TIMEOUT_MILLS: Long = 3 * 1000
private const val LOAD_REMOTE_SURVEY_TIMEOUT_MILLS: Long = 30 * 1000
private const val LOAD_REMOTE_SURVEY_TIMEOUT_MILLS: Long = 60 * 1000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Increasing the remote survey load timeout to 60 seconds will cause the existing unit test getRemoteSurvey throws error when loading remote survey times out in SurveyRepositoryTest.kt to fail. The test currently uses a delay of 35 seconds (35000 ms), which is now shorter than the new 60-second timeout, so it will no longer trigger a TimeoutCancellationException.\n\nPlease update the delay in SurveyRepositoryTest.kt (line 135) to be greater than 60 seconds (e.g., 65000 ms) to ensure the test continues to pass and correctly verifies the timeout behavior.

References
  1. Add or update unit tests for all new or changed behaviors. (link)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Survey list] "No surveys" message and sign out button shows while reloading list of surveys

1 participant